package com.dd.cloud.user.entity.pres;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author xt
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "基础处方库")
public class PresBasics {

    /**
     * 药品/处方名称表id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;


    /**
     * 基础方名称
     */
    @Column(length = 32, comment = "基础处方名称")
    private String name;


    /**
     * 医生id
     */
    @Column(length = 4, comment = "医生id")
    private Integer doctorId;


    /**
     * 备注
     */
    @Column(length = 512, comment = "备注")
    private String remark;

    /**
     * 状态
     */
    @Column(length = 4, comment = "状态 1.正常 -1.删除")
    private Integer status;

    /**
     * 排序
     */
    @Column(length = 20, comment = "排序")
    private Integer sort;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间")
    private LocalDateTime createDate;

    /**
     * 编辑时间
     */
    @Column(comment = "编辑时间")
    private LocalDateTime updateDate;

    /**
     * 编辑人
     */
    @Column(comment = "编辑人")
    private String updateName;


    /**
     * 处方内容
     */
    @TableField(exist = false)
    private String content;


    /**
     * 药品列表
     */
    @TableField(exist = false)
    private List<PresBasicsDrugs> presBasicsDrugsList;
}
